#include "ufbase.h"

UFBase::UFBase(int n):count(n),id(n)
{
    for(int i = 0; i < n; ++i)
    {
       id[i] = i;
    }
}


bool UFBase::isConnected(int s1, int s2)
{
    return find(s1) == find(s2);
}

int UFBase::componentCount()
{
    return count;
}
